Helpful Information
 
 
Category: CMS Articles
CMS Articles > Facebook posts (Where's the thumbnail?)

When publishing an article to my site the Facebook Application doesn't give the choice of any thumbnails of pics included in the article.

I've read that a meta tag missing causes this problem. Is there any add-on for that, or how can I fix this issue?:erm:

I just wanted to open a thread for this myself. I guess the reason is that all the attachment are delivered like this in the source code:
attachment.php?attachmentid=12345&cid=99

Facebook will probably only look for things like .jpg, .png and so on.

But I would also be very interested in any solution for that. Using images for Facebook sharing certainly draws a lot more attention to a post.
And since my CMS articles are are visible to anyone I don't need any rights management for attachments here.

I figured it out.
In the facebook_functions file in the includes directory there is a line that creates an og:image meta tag. Facebook will prefer to use that image. I commented this line out and now Facebook will give the usual option to select any image from the article. :-)

Can you please shows the line commented? Sorry for my bad english. Thanks for the solutions! Antonio

in includes/functions_facebook.php

REPLACE:
// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}

WITH:// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
#$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}[/PHP]

I am using Vb 4.1.3 and still I have the same problem....no fix, tried the code above, is there any thing else we can do ? :(

in includes/functions_facebook.php

REPLACE:
// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}

WITH:// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
#$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}[/PHP]

I honestly can't tell the difference. Does this really work?

There is a # which makes the whole line inactive.

Thank u so much Seite7! U rock!

We've reached 4.1.9. and Vbulletin still hasn't fixed that. Thanks Seite7!

We've reached 4.1.9. and Vbulletin still hasn't fixed that. Thanks Seite7!

We've reached 4.1.10. and Vbulletin still hasn't fixed that.

The change in code above fixed the issue on FB walls and is much appreciated but the problem still exists when viewing updates from friends who have shared something from your (our) site(s). :(

I just tried to change that and my site went down!!

Warning: require_once([path]/includes/functions_facebook.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/functions.php on line 7795

Fatal error: require_once() [function.require]: Failed opening required '/home/content/54/7891054/html/includes/functions_facebook.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/54/7891054/html/includes/functions.php on line 7795

This unfortunately does not seem to fix the problem in 4.2.1 - any other ideas as to why the only available preview image is the logo? Happens for every single page.










privacy (GDPR)